package yuwenlong.receiver;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import androidx.appcompat.app.AppCompatActivity;

import com.liao.liaowenlong.R;

public class ReceiverActivity extends AppCompatActivity implements View.OnClickListener {
    private static final String TAG = "ReceiverActivity";
    private MyReceiver myReceiver;
    private Button btn_sendReceiver;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_receiver);
        initView();
    }

    private void initView() {
        btn_sendReceiver = (Button) findViewById(R.id.btn_sendReceiver);

        btn_sendReceiver.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.btn_sendReceiver:
                sendBroadcast(new Intent("aa"));
                break;
        }
    }
}
